package com.hundsun.yr.universal.p2p.bean.enums;

import java.util.ArrayList;

import com.hundsun.yr.universal.p2p.bean.enums.base.Enum;
import com.hundsun.yr.universal.p2p.bean.enums.base.LabelEnum;
/**
 * 还款状态枚举类
 * @author tonglj
 *
 */
public class RefundStatusEnum extends  LabelEnum{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	private int num;
	/**
	 * 还款状态
	 * 
	 * UNREPAY("0", "未还款"),
	REPAYED("1", "已还款"),
	PARTIAL_REPAYED("2", "部分还款"),
	LATE("3", "逾期未还款"),
	LATE_REPAY("4", "逾期已还款"),
	OVER_DUE("5", "违约"),
	HONORED("6", "已兑付");
	 */
	

	public static RefundStatusEnum UNREPAY = new RefundStatusEnum("UNREPAY","未还款",0);
	public static RefundStatusEnum REPAYED = new RefundStatusEnum("REPAYED","已还款",1);
	public static RefundStatusEnum PARTIAL_REPAYED = new RefundStatusEnum("PARTIAL_REPAYED","部分还款",2);
	public static RefundStatusEnum LATE = new RefundStatusEnum("LATE","逾期未还款",3);
	public static RefundStatusEnum LATE_REPAY = new RefundStatusEnum("LATE_REPAY","逾期已还款",4);
	public static RefundStatusEnum OVER_DUE = new RefundStatusEnum("OVER_DUE","违约",5);
	public static RefundStatusEnum HONORED = new RefundStatusEnum("HONORED","已兑付",6);
	public static RefundStatusEnum COMPENSATORY_REPAY = new RefundStatusEnum("COMPENSATORY_REPAY","代偿已还款",7);
	public static RefundStatusEnum UN_COMPENSATORY_REPAY = new RefundStatusEnum("UN_COMPENSATORY_REPAY","代偿未还款",8);
	public static RefundStatusEnum PART_COMPENSATORY_REPAY = new RefundStatusEnum("PART_COMPENSATORY_REPAY","部分代偿",9);
	public static RefundStatusEnum VERIFICATION = new RefundStatusEnum("VERIFICATION","核销",10);
	public static RefundStatusEnum PRE_PREPAY = new RefundStatusEnum("PRE_PREPAY","已还清",12);
	public static RefundStatusEnum DELAY_COMPENSATING = new RefundStatusEnum("DELAY_COMPENSATING","代偿处理中",15);

	
	protected RefundStatusEnum(String name,String lable,int num) {
		super(name, lable,"refundStatus");
		this.num = num;
	}
	
	
	public int getNum(){
		return num;
	}
	@SuppressWarnings("unchecked")
	public static ArrayList<LabelEnum> getList() {
		mList.clear();
		mList.addAll(Enum.getEnumList(RefundStatusEnum.class));
		return mList;
	}
	/**
	 * 根据name获取RefundStatusEnum对象
	 * @param name
	 * @return
	 */
	public static RefundStatusEnum getEnum(String name){
		ArrayList<LabelEnum> list = getList();
		for (LabelEnum labelEnum : list) {
			if(name.equals(labelEnum.getName())){
				return (RefundStatusEnum) labelEnum;
			}
		}
		return null;
	}
	
	

	
}

